package com.clt.ess.CABeen;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

//使用 taskId 查询下载证书业务参数说CA 系统响应data参数（同步）
public class CheckResultData implements Serializable {
    //用于区分请求列表单个请求的业务编码（与请求对应）
    //必须
    private String requestID;
    //每个申请包处理的返回结果，0 是成功，其他表示错误
    //必须
    private String errorCode;
    //返回的文件结果
    //必须
    @SerializedName("package")
    private CheckResultPackage filePackage;

    /**
     {
         " requestID ": "0",
         "errorCode": "0",
         "package": {
             " signCert ": "base64编码的签名证书",
             " encCert ": "base64编码的加密证书",
             " encKeyProtection": " Base64编码的加密密钥对保护结构"
         }
     }     */
    public CheckResultData() {
    }

    public CheckResultData(String requestID, String errorCode, CheckResultPackage filePackage) {
        this.requestID = requestID;
        this.errorCode = errorCode;
        this.filePackage = filePackage;
    }

    public String getRequestID() {
        return requestID;
    }

    public void setRequestID(String requestID) {
        this.requestID = requestID;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public CheckResultPackage getFilePackage() {
        return filePackage;
    }

    public void setFilePackage(CheckResultPackage filePackage) {
        this.filePackage = filePackage;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"requestID\":\"")
                .append(requestID).append('\"');
        sb.append(",\"errorCode\":\"")
                .append(errorCode).append('\"');
        sb.append(",\"filePackage\":")
                .append(filePackage);
        sb.append('}');
        return sb.toString();
    }
}
